package com.alcatel_lucent.coff.test

import com.alcatel_lucent.coff.model.COFFFile
import com.alcatel_lucent.coff.service.COFFParser
import org.apache.commons.lang3.ArrayUtils
import org.apache.commons.lang3.StringUtils
import org.junit.Test

public class COFFFileTest {

    @Test
    void testRead() {
        String filePath = 'D:/360CloudUI/Cache/45698397/Programing/Study/nasm/HelloWorld'
        String fileName = 'hello.coff'
//        fileName = 'hello.exe'
//        fileName = 'util.o'
        File file = new File(filePath, fileName)
        COFFParser parser = COFFParser.instance
        COFFFile cf = parser.parse(file)
        println cf

//        String disAssemblerCmd = parser.getCodeSegmentDisAssemblerCmd(cf.sectionHeaders, file.absolutePath)
//        println "DisAssemble cmd: \n    ${disAssemblerCmd}"

    }
}
